function upLoadPicture() {
    var formData = new FormData($('form')[0]);
    $.ajax({
        url: 'http://up.tietuku.cn/',
        type: 'POST',
        success: function (data) {
            $("#img-box").empty();
			$("#img-box").append("<img src='"+data.linkurl+"' height='100'/>");
            $("#img").val(data.linkurl);
        },
        error: function (data) {
            console.log(data);
        },
        data: formData,
        cache: false,
        contentType: false,
        processData: false
    });
}
function upLoadPicture1() {
    var formData = new FormData($('form')[0]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#img1-box").empty();
            $("#img1-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#img1").val(data.linkurl);
            console.log($("#img1").val());
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}

function upLoadPicture2() {
    var formData = new FormData($('form')[1]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#img2-box").empty();
            $("#img2-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#img2").val(data.linkurl);
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}

function upLoadPicture3() {
    var formData = new FormData($('form')[2]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#img3-box").empty();
            $("#img3-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#img3").val(data.linkurl);
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}

function upLoadPicture4() {
    var formData = new FormData($('form')[3]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#img4-box").empty();
            $("#img4-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#img4").val(data.linkurl);
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}

function upLoadPicture5() {
    var formData = new FormData($('form')[4]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#img5-box").empty();
            $("#img5-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#img5").val(data.linkurl);
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}

function upLoadPicture6() {
    var formData = new FormData($('form')[5]);
    $.ajax({
        url : 'http://up.tietuku.cn/',
        type : 'POST',
        success : function(data) {
            // window.location.reload();
            $("#imgAddress-box").empty();
            $("#imgAddress-box").append(
                "<img src='" + data.linkurl + "' height='100'/>");
            $("#addressImg").val(data.linkurl);
        },
        error : function(data) {
            console.log(data);
        },
        data : formData,
        cache : false,
        contentType : false,
        processData : false
    });
}
